{% extends "base.html" %}
{% import 'bootstrap/wtf.html' as wtf %}
{% block title %}
    {{ current_user.username }}的个人资料编辑
{% endblock %}

{% block content %}
    <main>
        <div class="container">
            <br>
            {% include '_flash.html' %}
            <div class="jumbotron">
                <div class="row">
                    <div style="margin-bottom: 10px" class="col-md-8">
                        <img src="/static/img/index.jpg" class="rounded img-fluid">
                    </div>
                    <div class="col-md-4">
                        <div class="card mb-3 w-100 bg-light">
                            <div class="card-header"><h4>资料编辑</h4></div>
                            <div class="card-body">
                                <form action="/accounts/profile/edit/" method="post" enctype="multipart/form-data">
                                    {{ form.csrf_token }}
                                    {{ wtf.form_field(form.user_name) }}
                                    {{ wtf.form_field(form.website) }}
                                    {{ wtf.form_field(form.avatar) }}
                                    <p style="font-size: 14px;" class="text-muted"><strong>Tip:上传的头像请小于3M</strong></p>
                                    {{ wtf.form_field(form.slogan) }}
                                    {{ wtf.form_field(form.receive_email) }}
                                    {{ form.submit }}
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </main>
{% endblock %}